// 全局样式
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: #f5f7fa;
  overflow-x: hidden;
}

#root {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
}

// 卡片样式优化
.ant-card {
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: all 0.3s;
  width: 100%;
  
  &:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  }
  
  .ant-card-head {
    border-bottom: 1px solid #f0f0f0;
    padding: 16px 24px;
    
    .ant-card-head-title {
      padding: 0;
      font-weight: 600;
      font-size: 18px;
    }
  }
  
  .ant-card-body {
    padding: 20px 24px;
  }
}

// 按钮样式优化
.ant-btn {
  border-radius: 6px;
  transition: all 0.3s;
  
  &.ant-btn-primary {
    background: #1890ff;
    border-color: #1890ff;
    
    &:hover, &:focus {
      background: #40a9ff;
      border-color: #40a9ff;
    }
  }
  
  &.ant-btn-danger {
    background: #ff4d4f;
    border-color: #ff4d4f;
    color: #fff;
    
    &:hover, &:focus {
      background: #ff7875;
      border-color: #ff7875;
    }
  }
}

// 表单元素样式优化
.ant-input, .ant-input-affix-wrapper, .ant-select-selector, .ant-picker {
  border-radius: 6px;
  transition: all 0.3s;
  border-color: #d9d9d9;
  
  &:hover, &:focus {
    border-color: #40a9ff;
  }
}

// 表格样式优化
.ant-table {
  width: 100%;
  
  .ant-table-thead > tr > th {
    background-color: #fafafa;
    font-weight: 600;
  }
  
  .ant-table-row {
    transition: all 0.3s;
    
    &:hover {
      background-color: #e6f7ff;
    }
  }
}

// 标签样式
.ant-tag {
  border-radius: 4px;
  margin-right: 8px;
  padding: 2px 8px;
  
  &.ant-tag-success {
    color: #52c41a;
    background: #f6ffed;
    border-color: #b7eb8f;
  }
  
  &.ant-tag-error {
    color: #ff4d4f;
    background: #fff2f0;
    border-color: #ffccc7;
  }
  
  &.ant-tag-warning {
    color: #faad14;
    background: #fffbe6;
    border-color: #ffe58f;
  }
}

// 通用布局类
.page-container {
  padding: 20px;
  flex: 1;
  width: 100%;
}

// 响应式调整
@media (max-width: 768px) {
  .page-container {
    padding: 16px;
  }
  
  .ant-card {
    .ant-card-head {
      padding: 12px 16px;
    }
    
    .ant-card-body {
      padding: 16px;
    }
  }
}

// 状态样式
.status {
  &-1 {
    color: #52c41a;
  }
  
  &-0 {
    color: #ff4d4f;
  }
}